package com.dreem.proxy.staticproxy;

/**
 * @program: DesignParrtern
 * @description: 教师代理类
 * @author: Peng
 * @create: 2021-02-25  14:37
 **/
public class TeacherDaoProxy implements ITeacherDao {

    private TeacherDao teacherDao;

    public TeacherDaoProxy(TeacherDao teacherDao) {
        this.teacherDao = teacherDao;
    }

    @Override
    public void teach() {
        System.out.println("开启代理......");
        teacherDao.teach();
        System.out.println("关闭代理......");
    }
}
